﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace HARTCalibrationTool.Observers
{
    public class PanelUpdater : IObserver
    {
        private Panel _panel;

        public PanelUpdater(Panel panel)
        {
            _panel = panel;
        }
        public void Update(List<string> listStr)
        {
            if (_panel.InvokeRequired)
            {
                _panel.Invoke(new Action<List<string>>(Update), listStr);
            }
            else
            {
                _panel.BackColor = Color.IndianRed;
            }
        }
    }
}
